'''
name = [11,2,333,"laowang","laoli","laoliu"]
#增删改查
name.append("laozhao")
name.append("haha")
name.insert(2,"kongkong")
name1 = ["夏","艾露莎","露西","happy"]
name2 = ["格雷","温蒂","伽吉鲁","蕾比"]
name3 = name1 + name2
name.extend(name1)
name.pop()
name.remove("haha")
del name[0]
name[0] = "23333"
if "laowang" in name:
    print("老王在")
if "laozhao" not in name:
    print("没有老赵")
'''
'''
#名字管理器
#1.打印功能提示
print("-"*50)
print("1.add a name")
print("2.delete a name")
print("3.amend a name")
print("4.query a name")
print("5.exit program")
print("-"*50)
names = []
#2.获取用户选择
while True:
    choice = int(input("please input the function number:"))
    if choice==1:
        name = input("please enter the name to add:")
        names.append(name)
        print(names)
    elif choice==2:
        name = input("please enter the name to delete:")
        names.remove(name)
        print(names)
    elif choice==3:
        name1 = input("please enter the name you want to amend:")
        if name1 in names:
            names.remove(name1)
            name2 = input("input the new name:")
            names.append(name2)
        else:
            print("name not include")
        print(names)
    elif choice==4:
        name = input("please enter tne name to query")
        if name in names:
            print("name exist")
        else:
            print("name not exist")
        print(names)
    elif choice==5:
        break
    else:
        print("input wrong,try again")
#3.执行用户选择的功能
'''
'''
#遍历列表
nums = [11,22,33,44,55,66789]
nums_len = len(nums)
for temp in nums:
    print(temp)

i = 0
while i < nums_len:
    print(nums[i])
    i += 1
'''

#append 和 extend
a = [11,22,33]
b = [44,55]
#合并 a = [11,22,33,44,55]
a.extend(b)
print(a)
#整体添加 a = [11,22,33,[44,55]]
a.append(b)
print(a)








